Skip to content

Fix empty values in get_cli_string - #701

Open
Shuran-z wants to merge 1 commit into
theskumar:mainfrom
Shuran-z:fix-get-cli-string-empty-value
Open

Shuran-z wants to merge 1 commit into
theskumar:mainfrom
Shuran-z:fix-get-cli-string-empty-value

Conversation

@Shuran-z

Copy link
Copy Markdown

Preserve explicit empty strings in get_cli_string as "" while continuing to omit None. Previously, the generated command dropped the required value argument.

Add regression coverage that invokes the CLI and verifies the saved empty value.

Validation on Windows with Python 3.12: 207 passed, 50 skipped. Regression fails before the fix and passes afterward. Ruff checks and formatting passed.

@Voyagerroc-Lab Voyagerroc-Lab left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed c353b03. The explicit is not None guard correctly distinguishes an omitted value from an empty string. The parent commit drops the empty argument; this change preserves it as "", and the CLI regression verifies that the resulting .env value is actually empty. Additional comparisons against the parent retained the existing output for None, "0", ordinary strings, strings containing spaces, and a whitespace-only value.

Validation on Windows / CPython 3.14.7: full suite 207 passed, 50 skipped; Ruff lint and formatting checks passed. The local run needed Git for Windows' printenv on PATH for the existing subprocess tests.

Review and validation performed with OpenAI Codex at the account owner's request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants